package org.oneblog.service;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

import org.oneblog.bean.ImageConfiger;

//图片处理类
//图片存储在指定目录；BASE_FOLDER
//按照时间格式进行目录拆分，方便文件管理和查找;yyyyMM/ddHH/nanoTime.jpg
//
public interface IImageService {

    //上传并缩放
    String uploadImageWithFixedScale(File srcFile, ImageConfiger imageConfiger);
    
    //生成缩略图
    String uploadImageWithThumbnail(File srcFile, ImageConfiger imageConfiger);
    

    //上传并缩放
    String uploadImageWithFixedScale(InputStream inputStream, ImageConfiger imageConfiger);
    
    //生成缩略图
    String uploadImageWithThumbnail(InputStream inputStream, ImageConfiger imageConfiger);
    
    FileInputStream readImageByRelativePath(String path);
}
